package com.bm.server.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bm.common.dto.GiftDescDto;
import com.bm.server.entity.Gift;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GiftDescDao extends BaseMapper<Gift> {
    @Select("SELECT g.giftname,g.giftprice,g.gifturl ,g.gtime FROM t_gift AS g ORDER BY gtime DESC LIMIT 3")
    List<GiftDescDto> giftDesc();
    @Select("SELECT g.giftname,g.gifturl,g.giftprice FROM t_gift AS g ORDER BY RAND() LIMIT 4 ")
    List<GiftDescDto> giftRandom();
}
